package com.study.thymeleaf.core;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.Serializable;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
 * <p>
 * 用户表
 * </p>
 *
 *
 * @since 2020-04-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class UserInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long id;

    private String username;

    private String img;

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date createTime;

    private String realname;

    private Integer deptId;

    private String deptName;

    private Integer status;

    private String parentName;

    private Long parentId;

    private Integer companyId;

    private String companyName;

    private Integer usertype;

    private Set<String> authoritiesUrlList = new HashSet<>();

    private transient HttpServletRequest request;

    private transient HttpServletResponse response;

    private List<Long> roles;

    private Integer emailAccount;

    private Long superUserId;

    private Integer superRoleId;


    public Long getSuperUserId() {
        return 14773L;
    }

    public void setSuperUserId(Long superUserId) {

    }

    public Integer getSuperRoleId() {
        return 180162;
    }

    public void setSuperRoleId(Integer superRoleId) {

    }

    private String post;

    /**
     * 未授权菜单
     * */
    private List<String> noAuthMenuUrls;

    /**
     * 是否为区域后台管理员
     */
    private Boolean isDistrictAdmin;

    /**
     * 如果是区域后台管理员，管理的区域列表
     */
    private Set<String> managedDistrict;


}
